package com.common.BearMethods;

import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.utils.SortUtils;

import rx.Observable;
import rx.Subscriber;

public class ModifyInfoMethods extends BaseMethods {

    private static ModifyInfoMethods m_ins = null;

    public static ModifyInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (ModifyInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new ModifyInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "api/Shop/";
    }

    private BearService initService() {
        return getRetrofit().create(BearService.class);
    }


    public void     guideMaintain           (Subscriber<Object> subscriber,
                      String uid ,
                      String hashid ,String faceid ,String nickname ,String goshop_num) {
        String time  = System.currentTimeMillis()+"" ;
        Observable observable = initService().guideMaintain (time,
                SortUtils.getMyHash("time"+time,"uid"+uid
                        ,"hashid"+hashid
                        ,"faceid"+faceid
                        ,"nickname"+nickname
                        ,"goshop_num"+goshop_num
                ), Constans.ANDROID_APP_ID,"3",
              uid,hashid,faceid,nickname,goshop_num
        );
        toSubscribe(observable, subscriber);
    }
}
